{% extends "master.html" %}

{% block title_meta %}
    <title>guojl's blog</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
{% endblock %}
{% block css %}
    <link href="http://static.guojl.com/css/Meneame.css" rel="stylesheet" type="text/css" />
    <link href="http://static.guojl.com/css/pagination.css" rel="stylesheet"type="text/css" />
{% endblock %}
{% block content %}
        <!-- start content -->
        <div id="content">
            {% for art in article.object_list %}
                <div class="post">
                    <h1 class="title"><a target="_blank" href="/article/{{ art.id }}/">{{ art.title }}</a></h1>
                    <p class="byline"><small>Posted on {{ art.updatetime|date:'Y/m/d H:m:s' }}</small></p>
                    <div class="entry">
                        {% if art.description == '' %}
                            {{ art.content|slice:':300'|safe }}
                        {% else %}
                            {{ art.description|slice:':300' }}
                        {% endif %}

                    </div>
                    <p class="meta"><a href="/article/{{ art.id }}/" target="_blank" class="more">Read More</a> &nbsp;&nbsp;&nbsp; <a target="_blank" href="/article/{{ art.id }}/#comment" class="comments">Comments ({{ art.comment_set.all|length }})</a></p>
                </div>
            {% endfor %}
    <div class="meneame">
        {% if article.has_previous %}
            {% block previous %}
                <a class="prev" href="/page/{{article.previous_page_number }}">« Previous</a>
            {% endblock %}
        {% else %}
            <span class="disabled">« Previous</span>
        {% endif %}
        {% for page in paginator.page_range %}
            {% ifequal p page %}
                <span class="current">{{ page }}</span>
            {% endifequal %}
            {%  ifnotequal p page %}
                {% block pagenum %}
                    <a href="/page/{{ page }}">{{ page }}</a>
                {% endblock %}
            {% endifnotequal %}
        {% endfor %}
        {% if article.has_next %}
            {% block next %}
            <a class="next" href="/page/{{ article.next_page_number }}">Next »</a>
            {% endblock %}
        {% else %}
            <span class="disabled">« Next »</span>
        {% endif %}
    </div>
           </div>
        <!-- end content -->
        <!-- start sidebar -->

        <!-- end sidebar -->
{% endblock %}

